//
//  ModuleVCA.m
//  CocoaSynth
//
//  Created by Pierre DUCHENE on 12/02/10.
//  Copyright 2010 Pierre DUCHENE. All rights reserved.
//

#import "ModuleVCA.h"
#import "SynthKit.h"

@implementation ModuleVCA

#pragma mark -
#pragma mark Accessors 

@synthesize initialGain;

#pragma mark -
#pragma mark Memory Management

- (id)init
{
	if (self = [super init]) {
		inputAm = nil;
		portInAm = nil;
		
		initialGain = kVCADefaultInitialGain;
	}
	
	return self;
}

- (void)dealloc 
{
	[inputAm release];
	inputAm = nil;
	
	[portInAm release];
	portInAm = nil;
	
	[super dealloc];
}

#pragma mark -
#pragma mark Accessors

@synthesize inputAm;
@synthesize portInAm;

#pragma mark -
#pragma mark Module Methods

- (void)read
{
	[self setInputSample:[portIn getSample]];
	inputAm = [[portInAm getSample] retain];
}

@end

